package com.makerworks.medu;

import android.app.Activity;
import android.os.Bundle;
import android.support.percent.PercentRelativeLayout;
import android.view.View;
import android.widget.ImageView;


/**
 * Created by tom on 16/9/8.
 */
public class ConnectGuideBleActivity extends Activity {

    private static final String TAG = ConnectGuideBleActivity.class.getSimpleName();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_connect_ble_guide);

        View navBack = findViewById(R.id.guide_back);
        ImageView imageBluetooth = (ImageView) findViewById(R.id.image_bluetooth);
        ImageView imageConnected = (ImageView) findViewById(R.id.image_connected);

        //change image according to local language preference
        String currentLanguage = getResources().getConfiguration().locale.toString();
        if (currentLanguage.equalsIgnoreCase("zh_cn")) {
            imageBluetooth.setImageResource(R.drawable.image_connect_guide_bluetooth_cn);
            imageConnected.setImageResource(R.drawable.image_connect_guide_connected_cn);
        }else if (currentLanguage.equalsIgnoreCase("zh_hk") || currentLanguage.equalsIgnoreCase("zh_tw")){
            imageBluetooth.setImageResource(R.drawable.image_connect_guide_bluetooth_cn_tw);
            imageConnected.setImageResource(R.drawable.image_connect_guide_connected_cn_tw);
        }else {
            imageBluetooth.setImageResource(R.drawable.image_connect_guide_bluetooth_en);
            imageConnected.setImageResource(R.drawable.image_connect_guide_connected_en);
        }

        navBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }

}
